using System;
using Decisions.HL7.Message;

namespace Decisions.HL7
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
    public class HL7FieldAttribute : Attribute
    {
        private HL7Version version;
        private int position;
        private HL7Repeat repeat;
        private HL7Required required;
        private string dataTypeCode;

        public HL7FieldAttribute(HL7Version version, int position, HL7Repeat repeat, HL7Required required):this(version,position,repeat,required,null)
        {
            
        }

        public HL7FieldAttribute(HL7Version version, int position, HL7Repeat repeat, HL7Required required, string dataTypeCode)
        {
            this.version = version;
            this.position = position;
            this.repeat = repeat;
            this.required = required;
            this.dataTypeCode = dataTypeCode;
        }

        public int Position
        {
            get { return position; }
        }

        public HL7Version Version
        {
            get { return version; }
        }

        public HL7Repeat Repeat
        {
            get { return repeat; }
        }

        public HL7Required Required
        {
            get { return required; }
        }

        public string DataTypeCode
        {
            get { return dataTypeCode; }
        }
    }
}